DEMO: The fadeVolume Method

The basic form of the fadeVolume method takes five parameters...

This demonstration use a variation of the fadeVolume method that only takes the first three of the parameters listed above. In addition, it uses the value null for the StartVolumeLevel parameter to indicate that all fades should always start at the player's current volume setting.

Using the grid further below (may still be loading in), you can select any combination of destination volume level and fade time to get a feel for how the fadeVolume method can achieve any number of different fade effects, including...

On the grid, destination volume is represented by the vertical axis, and fade time is represented by the horizontal axis. At all times while moving the mouse inside the grid, the "Volume" and "Fade Time (ms)" value display boxes will be updated to reflect the values represented by your current position in the grid.

When you find a desired combination of values, simply click on your exact position on the grid to initiate the fade. You can then move your position inside the grid without it affecting the fade that is in progress. You can initiate another fade even while a fade is still in progress. This has the effect of overriding the current fade and starting a new fade from the player's current volume setting. This demonstrates the real behavior of the fadeVolume method when used in scripting.